import axios from 'axios';
import global from '../../assets/js/global'
let center = global.center;//个人中心  --- zk
let picture = global.picture
let second = global.second;//秒合约  --- wsg
let agreement = global.agreement;//合约  --- wsg
//用户余额
export const userWalletList = params => { return axios.get( center+'/userWallet/list', {params:params}).then(res => res) };


//主钱包记录
export const userWalletRecord = params => { return axios.get( center+'/userWallet/userWalletRecord', {params:params}).then(res => res) };
//个人中心状态
export const userInfo = params => { return axios.get( center+'/userInfo/queryStatus', {params:params}).then(res => res) };
//登录
export const userLogin = params => { return axios.post( center+'/user/login', params).then(res => res) };
//注册
export const userRegister = params => { return axios.post(`${center}/user/register`, params).then(res => res) };
//获取验证码
export const sendVerificationCode = params => { return axios.post(`${center}/user/sendVerificationCode`, params).then(res => res) };
//忘记密码一
export const forgetPasswordOne = params => { return axios.post(`${center}/userInfo/forgetPasswordOne`, params).then(res => res) };
//忘记密码二
export const forgetPasswordTwo = params => { return axios.post(`${center}/userInfo/forgetPasswordTwo`, params).then(res => res) };

//设置账户密码
export const updatePassword = params => { return axios.post(`${center}/userInfo/updatePassword`, params).then(res => res) };
//绑定手机号
export const bindPhoneNo = params => { return axios.post(`${center}/userInfo/bindPhoneNo`, params).then(res => res) };
//绑定邮箱
export const bindEmail = params => { return axios.post(`${center}/userInfo/bindEmail`, params).then(res => res) };
//获取区号
export const allAreaCode = params => { return axios.post(`${center}/countryCity/allAreaCode`, params).then(res => res) };
//实名认证
export const userInfoVerified = params => { return axios.post(`${center}/userInfo/verified`, params).then(res => res) };
//查看实名认证
export const seeUserInfoVerified = params => { return axios.get(`${center}/userInfo/queryVerified`, {params:params}).then(res => res) };
//获取邀请码
export const inviteDetails = params => { return axios.post(`${center}/userInvite/inviteDetails`, params).then(res => res) };
//修改邀请码
export const userInviteAdd = params => { return axios.post(`${center}/userInvite/add`, params).then(res => res) };
//推广收益
export const promotionRevenue = params => { return axios.post(`${center}/userInvite/promotionRevenue`, params).then(res => res) };
//添加/修改银行卡
export const addOrUpdateBank = params => { return axios.post(`${center}/userBank/addOrUpdateBank`, params).then(res => res) };
//查看看银行卡
export const userBankDetails = params => { return axios.post(`${center}/userBank/userBankDetails`, params).then(res => res) };

// 图片上传
export const pictureUpdata = params => { return axios.post(`${picture}`,params).then(res => res) };

//otc入金
export const otcBuy = params => { return axios.post(`${center}/otc/buy/apply`, params).then(res => res) };
//otc入金记录
export const otcList = params => { return axios.post(`${center}/otc/buy/list`, params).then(res => res) };

//otc出金
export const otcSale = params => { return axios.post(`${center}/otc/sale/sale`, params).then(res => res) };
//otc出金记录
export const otcSalelist = params => { return axios.post(`${center}/otc/sale/list`, params).then(res => res) };
//消息
export const getCatAndContentList = params => { return axios.post(`${center}/helpContent/getCatAndContentList`, params).then(res => res) };

//充币地址
export const getCoinRechargeAddress = params => { return axios.post(`${center}/getCoinRechargeAddress`, params).then(res => res) };
//充币记录
export const getCoinRechargeList = params => { return axios.post(`${center}/getCoinRechargeList`, params).then(res => res) };


//提币信息
export const getCoinDrawInfo = params => { return axios.post(`${center}/getCoinDrawInfo`, params).then(res => res) };
//发起提币
export const askForCoinDraw = params => { return axios.post(`${center}/askForCoinDraw`, params).then(res => res) };
//提币记录
export const getCoinDrawList = params => { return axios.post(`${center}/getCoinDrawList`, params).then(res => res) };

//秒划转
export const SwalletTransfer = params => { return axios.post(`${second}/scontract/wallet/transfer`, params).then(res => res) };
//合约划转
export const CwalletTransfer = params => { return axios.post(`${agreement}/contractWallet/transfer`, params).then(res => res) };